package main;

import javafx.application.Application;
import javafx.stage.Stage;
import vk.AuthCompleteListener;
import vk.AuthComponent;

/**
 * Date: 24.11.12
 *
 * @author Mikhail Larinskiy
 */
public class MainApplication extends Application {
    @Override
    public void start(final Stage stage) throws Exception {
        AuthComponent auth = new AuthComponent(new AuthCompleteListener() {
            public void handle() {
                AppWindow app = new AppWindow();
                try {
                    app.show(stage);
                } catch (Exception e) {
                    System.err.println(e);
                }
            }
        });
        auth.start(stage);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
